<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="pages"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<sx:head cache="true" />

<s:set var="text" value="%{#attr.text}" />
<s:if test="%{#attr.text == null}">
	<s:set var="text" value="rtl" />
</s:if>

<s:set var="alignleft" value="%{#attr.alignleft}" />
<s:if test="%{#attr.alignleft == null}">
	<s:set var="alignleft" value="left" />
</s:if>

<s:set var="alignright" value="%{#attr.alignright}" />
<s:if test="%{#attr.alignright == null}">
	<s:set var="alignright" value="right" />
</s:if>


<html>
	<head>
		<title><s:property value="#attr.configuration.defaultMetaTitle" /> <decorator:title /></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="Content-Language" content="en,fr,ar" />
		<meta name="description" content="<s:property value="#attr.configuration.defaultMetaDescription" />">
		<meta name="keywords" content="<s:property value="#attr.configuration.defaultMetaKeywords" />">

		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<link rel="shortcut icon" href="images/images.jpg">
		<link rel="stylesheet" type="text/css" href="css/chromestyle.css" />

		<script type="text/javascript" src="js/quickmenu.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/ddm.js"></script>

		<decorator:head />
	</head>

    <body>
		<s:set name="left" var="left" value="1" />
        <s:set name="right" var="right" value="1" />

        <s:if test="%{leftAllowed != null && leftAllowed == false}">
        	<s:set var="left" value="0" />
		</s:if>

        <s:if test="%{rightAllowed != null && rightAllowed == false}">
        	<s:set var="right" value="0" />
		</s:if>

       	<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td valign="top">
					<%@ include file="/panels/front-header.jsp" %>
				</td>
            </tr>
			<tr>
				<td valign="top">
					<div style="margin:11px 20px 17px 20px">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
                            <s:if test="%{#left == 1}">
                                <td width="223" valign="top">
                                <div>
                                 <s:if test="%{loginPage != null && loginPage == true}">
                                	<%@ include file="/panels/front-login-left.jsp" %>
                                </s:if>
								<s:elseif test="%{categories != null}">
                                	<%@ include file="/panels/front-sub-categories.jsp" %>
                                </s:elseif>
                                <s:elseif test="%{showItem != null}">
                                	<%@ include file="/panels/front-buyer-resource.jsp" %>
                                </s:elseif>
								<s:elseif test="%{messaging != null}">
                                	<%@ include file="/panels/front-messaging.jsp" %>
                                </s:elseif>
                                <s:elseif test="%{#session.user == null || myAccount == null}">
                                	<%@ include file="/panels/front-left.jsp" %>
                                </s:elseif>
                                <s:else>
                                	<%@ include file="/panels/front-user-left.jsp" %>
                                	<%@ include file="/panels/NutchSearch.jsp" %>
                                	<%@ include file="/panels/front-googleads.jsp" %>
                                </s:else>
                                </div>
                                </td>
                            </s:if>
                            	<td valign="top">
	                            	<div style="margin:0px 17px 0px 17px">
	                                	<decorator:body />
									</div>
	                            </td>
                            <s:if test="%{#right == 1}">
	                            <td width="211" valign="top">
	                            	<div style="margin:0px 0px 0px 0px">
	                                	<%@ include file="/panels/front-right.jsp" %>
	                                </div>
	                            </td>
                            </s:if>
                            </tr>
                       	</table>
					</div>
				</td>
			</tr>
            <tr>
            	<td>
					<%@ include file="/panels/front-footer.jsp" %>
				</td>
			</tr>
		</table>
	</body>
</html>
